$().ready(function(){
initFlashUpload();
})


function initFlashUpload(){
	$('#file_upload').uploadify({
			'uploader'       : ($("#newsurl").val())+'skin/jquery.uploadify-v2.1.4/uploadify.swf',
			'script'         : ($("#newsurl").val())+'e/jat/act_up_pic.php',
			'cancelImg'      : ($("#newsurl").val())+'skin/jquery.uploadify-v2.1.4/cancel.png',
			'folder'         : ($("#newsurl").val())+'skin/upload',
			'multi'          : true,
			'auto'           : false,
			//'buttonText'  : 'brower',
			'height':41,
			'width':142,
			'buttonImg'           : ($("#newsurl").val())+'images/upbtn.jpg',
			"scriptData"	 : {"id":$("#app_id").val(),'sid':($("#session_id").val()||"")},
			'onComplete'  : function(event, ID, fileObj, response, data) {						
				var o=getObject(response)
			if(o){
				if(o.flag==1){
					//alert(o.id);
					window.location.href='./?v=ps&id='+$("#app_id").val();
				}else{
					alert(o.msg);
				}
			}else{
				alert('系统错误！');
			}		
		},
		"":function(){
		
		},
		"onAllComplete"	:function(){					
			//$(".list-p").append("<div class='clear'></div>");
			//$(".ok_div").show();
		}
		  });
}
function setUpFileStart(){
	$('#file_upload').uploadifyUpload();
}